import request from '@/utils/request'

// 查询练习完成记录列表
export function listPracticeRecord(query) {
  return request({
    url: '/exam/practiceRecord/list',
    method: 'get',
    params: query
  })
}

// 查询练习完成记录详细
export function getPracticeRecord(recordId) {
  return request({
    url: '/exam/practiceRecord/' + recordId,
    method: 'get'
  })
}

// 新增练习完成记录
export function addPracticeRecord(data) {
  return request({
    url: '/exam/practiceRecord',
    method: 'post',
    data: data
  })
}

// 修改练习完成记录
export function updatePracticeRecord(data) {
  return request({
    url: '/exam/practiceRecord',
    method: 'put',
    data: data
  })
}

// 删除练习完成记录
export function delPracticeRecord(recordId) {
  return request({
    url: '/exam/practiceRecord/' + recordId,
    method: 'delete'
  })
}

// 导出练习完成记录
export function exportPracticeRecord(query) {
  return request({
    url: '/exam/practiceRecord/export',
    method: 'get',
    params: query
  })
}